//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsArticleRelateTags, CmsArticleRelateTagsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsArticleRelateTagsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsArticleRelateTagsResponse>(`/uctoo/cms_article_relate_tags/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsArticleRelateTags = async (id: string) => {
  return requestClient.get<CmsArticleRelateTags>(`/uctoo/cms_article_relate_tags/${id}`);
};

export const adductooCmsArticleRelateTags = async (data: Partial<CmsArticleRelateTags>) => {
  return requestClient.post<CmsArticleRelateTags>('/uctoo/cms_article_relate_tags/add', data);
};

export const edituctooCmsArticleRelateTags = async (data: Partial<CmsArticleRelateTags>) => {
  return requestClient.post<CmsArticleRelateTags>('/uctoo/cms_article_relate_tags/edit', data);
};

export const deleteuctooCmsArticleRelateTags = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_article_relate_tags/del', { id });
};
